<template>
  <div class="home">
    <div class="title-bar">搜索 🔍</div>
    <div>------home组件-------</div>

    <div>
      <span @click="handleMsg" style="margin-right: 10px;">歌词</span>
      <span @click="handleSet">设置</span>
    </div>
  </div>
</template>

<script setup lang="ts">
import { onMounted } from 'vue'
import { useRouter } from 'vue-router'
import { useStore } from '@store'
import { login } from '@api/index'

const router = useRouter()
const store = useStore()

const changePage = () => {
  router.push('/about')
}
const handleLogin = () => {
  login({ name: 'tong' })
    .then((res) => {
      console.log(res)
    })
    .catch((err) => {
      console.log(err)
    })
}
const handleMsg = () => {
  electron.ipcRenderer.invoke('lyricsWindow')
}
const handleSet = () => {
  console.log('设置')
}

onMounted(() => {
})
</script>

<style scoped lang="scss">
.home{
  background-color: pink;
  .title-bar{
    background-color: #9ff6e0c2;
    width: 100%;
    height: 40px;
    text-align: center;
    line-height: 40px;
    font-size: 13px;
    app-region: drag;
  }
}
</style>
